import os
import sys
import json
import traceback
from datetime import datetime, timedelta


class GlobalCfg(object):
    
    GLOBAL_VERSION = 0
    GLOBAL_CONFIG_FILE = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'config.json')
    
    def __init__(self):
        self.workspace = ''
        
        
        with open(GlobalCfg.GLOBAL_CONFIG_FILE, 'r') as f:
            config = json.load(f)
        for key in config:
            exec(f'self.{key} = config[{key}]')
        
        